package function.listen;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

import frame.info;
import frame.data.contrldata;

public class menuhlisten {
	private String info[]= {"手册","更新","关于"};
	private JMenuItem[] item;
	public menuhlisten() {
		item=new JMenuItem[info.length];
		contrldata.toolh=new JMenu("帮助");
		for(int i=0;i<info.length;i++) {
			item[i]=new JMenuItem(info[i]);
			contrldata.toolh.add(item[i]);
		}
	}
	/**
	 * 加载子菜单监听
	 */
	public void loadmenuitemlisten() {
		item[2].addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {new info();}
		});
	}
}
